using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Dazzle
{
    /// <summary>
    /// Created when invoked by COM.  This gives Box threads a way to access the
    /// main thread via Invoke().
    /// </summary>
    public partial class HiddenForm : Form
    {
        public HiddenForm()
        {
            InitializeComponent();
            IntPtr hh = Handle;  // force creation
        }

        /// <summary>Makes invocation of Invoke more concise with parameter-
        /// less methods.</summary>
        public void Invoke(MethodInvoker invoker)
        {
            Invoke((Delegate)invoker);
        }

        /// <summary>Makes invocation of Invoke more concise with parameter-
        /// less methods.</summary>
        public void BeginInvoke(MethodInvoker invoker)
        {
            BeginInvoke((Delegate)invoker);
        }
    }
}